import java.io.*;
import java.util.ArrayList;

public class ReadFile {
    public ArrayList<String> ReadFile() {
        ArrayList<String> stringArrayList = new ArrayList<>();
        File file = new File("testfile.txt");
        try {
            FileReader fre = new FileReader(file);
            String result = "";
            BufferedReader br = new BufferedReader(fre);
    
            String s = null;
            while ((s = br.readLine()) != null) {
                s += '\n';
                stringArrayList.add(s);
            }
            br.close();
            return stringArrayList;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}
